package com.dk.service.Impl;

import com.dk.mapper.TabRouteMapper;
import com.dk.mapper.TabUserMapper;
import com.dk.pojo.TabRoute;
import com.dk.pojo.TabUser;
import com.dk.pojo.TabUserExample;
import com.dk.service.LoginService;
import com.google.gson.Gson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LoginServiceImpl implements LoginService {
    @Autowired
    TabUserMapper tabUserMapper;
    @Autowired
    RedisTemplate redisTemplate;

    @Override
    public TabUser getUserInfo(String username) {
            //没有就去数据库查
            TabUser tabUser = tabUserMapper.selectByUserName(username);
            return tabUser;
    }

    @Override
    public void updateFlag(TabUser user) {
        tabUserMapper.updateByPrimaryKeySelective(user);
    }
}
